//
//  NSString+Hash.m
//  Pthread
//
//  Created by Yanyan Jiang on 2025/3/7.
//  Copyright © 2025 Yanyan Jiang. All rights reserved.
//

#import "NSString+Hash.h"
#import "NSData+Hash.h"

@implementation NSString (Hash)

- (NSData *)sha256Hash {
    // 将字符串转换为 UTF-8 编码的 NSData
    NSData *inputData = [self dataUsingEncoding:NSUTF8StringEncoding];
    return [inputData sha256Hash];
}

@end
